﻿<UserControl x:Class="ControleRepresentanteSync.View.Setup.UserPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:View="clr-namespace:ControleRepresentanteSync.View" DataContextChanged="UserControlDataContextChanged">
	<UserControl.Resources>
		<View:VisibilityConverter x:Key="notVisibilityConverter" IsInverse="True" />
	</UserControl.Resources>
	<StackPanel Orientation="Vertical">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="25"/>
                <RowDefinition Height="25"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="150" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <TextBlock Text="Usuário:" Margin="0,0,5,0" />
            <TextBox Text="{Binding Path=Username,UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Width="150" HorizontalAlignment="Left" />
            <TextBlock Text="*" Grid.Column="2" Foreground="Red" Margin="3,0,0,0" HorizontalAlignment="Left"
                       Visibility="{Binding Path=IsUsernameValid, Converter={StaticResource notVisibilityConverter}}" />

            <TextBlock Text="Senha:" Grid.Row="1" Margin="0,3,5,0" />
            <PasswordBox x:Name="passwordBox" Grid.Row="1" Grid.Column="1" 
                         PasswordChanged="PasswordBoxPasswordChanged" Width="150" 
                         Margin="0,3,0,0" HorizontalAlignment="Left" />
            <TextBlock Text="*" Grid.Row="1" Grid.Column="2" Foreground="Red" Margin="3,0,0,0" HorizontalAlignment="Left"
                       Visibility="{Binding Path=IsPasswordValid, Converter={StaticResource notVisibilityConverter}}" />
        </Grid>
    </StackPanel>
</UserControl>
